<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
  <script src="./vue.js"></script>
</head>

<body>
  <div id="app">
    <!-- 事件调用方法没有参数 -->
    <button @click="btn1Click">1</button>
    <button @click="btn1Click()">2</button>
    <button @click="btn2Click(123)">3</button>
    <button @click="btn2Click()">4</button>
    <button @click="btn2Click">5</button>
    <button @click="btn3Click('ab',$event)">6</button>
  </div>

  <script>
    var vm = new Vue({
      el: '#app',
      data: { name: 'Taec' },
      methods: {
        btn1Click() {
          console.log('btn1');
        },
        btn2Click(event) {
          console.log(event + '-----');
        },
        btn3Click(a, event) {
          console.log(a, event);
        }
      }
    })
  </script>
</body>

</html>